#include"process.h"
#include<string.h>
#define MAX_SIZE 101
#define MAX_RATE 100
#define TIME 1000*40
#define STYLE '#'
char* str ="|/-\\";
void process()
{
    int num = strlen(str);
    char arr[MAX_SIZE];
    memset(arr,'\0',sizeof(arr));
    int rate = 0;
    while(rate <= MAX_RATE)
    {
        printf("[%-100s][%d%%][%c]\r",arr,rate,str[rate % num]);
        fflush(stdout);
        usleep(TIME);
        arr[rate++] = STYLE;

    }
    printf("\n");
}
